import numpy as np
import math


class PolarCoordConvert:
    @staticmethod
    def convert(center, data):
        result = []
        for i in range(len(data)):
            r = np.sqrt(np.square(center[0]-data[i][0]) + np.square(center[1]-data[i][1]))
            theta = math.acos((data[i][0] - center[0]) / r)
            result.append([r, theta])
        return result
